local funcs = {}

funcs["goto"] = function ( hero,args )
	local wave = tonumber(args[1])
	GameRules.gw_lv = wave
end

funcs["suit"] = function ( hero,args )
	local t = args[1]
	for i=12,14 do
		local suittype = "item_"..t..i
		hero:AddItemByName(suittype)
	end
end

funcs["gold"] = function ( hero,args )
	local goldnum = tonumber(args[1])
	local id = hero:GetPlayerOwnerID()
	ModifyGoldLtx(id,goldnum)
end

funcs["food"] = function ( hero,args )
	local num = tonumber(args[1])
	local id = hero:GetPlayerOwnerID()
	ModifyFood(id,num)
end
funcs["wood"] = function ( hero,args )
	local num = tonumber(args[1])
	local id = hero:GetPlayerOwnerID()
	ModifyWood(id,num)
end

function CAddonTemplateGameMode:test_chat(hero,cmd,args)
	if args then
		args = string.split(args," ")
	end
	if funcs[cmd] then
		funcs[cmd](hero,args)
	end
end